import xadmin
from organization.models import City, Organization, Teacher


class OrganizationAdmin:
    list_display = ('name', 'description', 'city', 'address', 'created', 'collections')
    search_fields = ('name', 'description', 'city', 'address', 'collections')
    list_filter = ('name', 'description', 'city', 'address', 'created', 'collections')


class CityAdmin:
    list_display = ('name', 'description', 'created')
    search_fields = ('name', 'description')
    list_filter = ('name', 'description', 'created')


class TeacherAdmin:
    list_display = ('organization', 'name', 'working_years', 'company', 'position', 'features', 'collections')
    search_fields = ('organization', 'name', 'working_years', 'company', 'position', 'features', 'collections')
    list_filter = ('organization', 'name', 'working_years', 'company', 'position', 'features', 'collections')


xadmin.site.register(City, CityAdmin)
xadmin.site.register(Organization, OrganizationAdmin)
xadmin.site.register(Teacher, TeacherAdmin)

